﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace SpaceNeedle.City6473.WebSite.Models
{

    [MetadataType(typeof(EditUserModelMetaData))]
    public class EditUserModel : UsersModel
    {
        public string OldEmail { get; set; }
    }

    public class EditUserModelMetaData
    {
        [Required(ErrorMessage = "*")]
        [StringLength(50, ErrorMessage = "No máximo '{1}' caracteres.")]
        public string Name { get; set; }

        [Required(ErrorMessage = "*")]
        [StringLength(255, ErrorMessage = "No máximo '{1}' caracteres.")]
        [EmailAddress(ErrorMessage = "E-mail inválido")]
        public string Email { get; set; }


        [Required(ErrorMessage = "*")]
        [StringLength(50, ErrorMessage = "No máximo '{1}' caracteres.")]
        public string Roles { get; set; }

    }
}